var t = getApp(), s = t.requirejs("core");

Page({
    data: {
        'express_type' : "",
        'link' : "",
        'express_show' : true,
    },
    onLoad: function(s) {
        // console.log(s);
        this.setData({
            options: s
        }), t.url(s), this.get_list();
    },
    get_list: function() {
        var t = this;
        s.get("order/express", t.data.options, function(e) {
            // console.log(e)
            // 0 == e.error ? (e.show = !0, t.setData(e)) : s.toast(e.message, "loading");
            if (e.error==0) {
                e.show = !0, t.setData(e)
                if (e.express_type==0) {
                    t.setData({
                        express_type: e.express_type,
                        link: e.link,
                        express_show: false
                    });
                }else{
                    t.setData({
                        express_show: true
                    });
                }  
            } else {
                s.toast(e.message, "loading");
            }
            
        });
    }
});